/**
 * Created with intelliJ IDEA.
 * Description:
 * User:常亚洁
 * Date:20250920
 * Time:10:28
 */
class WashMachine{
    public String brand;//品牌
    public String type;//型号
    public String color;
    public double weight;
    public double length;
    public double width;
    public double height;

    public void WashMachine(){
        System.out.println("洗衣功能");
        System.out.println("脱水功能");
        System.out.println("定时功能");
    }
}
class Dog{
    public String name;
    public int age;
    public String color;
    public void eat(){
        System.out.println(name+"吃狗粮");
    }
    public void play(){
        System.out.println("飞盘");
    }
        }
public class test {

    public void test1(){
        System.out.println("test........");
    }

    public static void main(String[] args) {
        test test1=new test();
        test1.test1();


    }


    public static void main1(String[] args) {
        int a=10;
        Dog dog= new Dog();//对象的实例化  new了一个dog
        dog.name="小黑";//通过对象的引用，可以访问对象的成员变量
        dog.age=1;
        dog.eat();//通过对象的引用，可以访问对象的成员方法
        System.out.println(dog.name);//成员变量可以不初始化name和age不是局部变量
        System.out.println(dog.age);
        System.out.println("=====================");

        Dog dog2 =new Dog();//你可以通过关键字new实例化多个对象
        dog2.name="小红";
        dog2.age=2;
        System.out.println(dog2.name);
        System.out.println(dog2.age);

    }
}
